package com.example.demo.service.impl;

import com.example.demo.dao.OperationManualDao;
import com.example.demo.entity.response.Response;
import com.example.demo.entity.sqlbean.OperationManual;
import com.example.demo.service.OperationManualService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 11237
 */
@Service
public class OperationManualServiceImpl implements OperationManualService {

    @Autowired
    OperationManualDao manualDao;

    @Override
    public Response takeGuide(Long productId) {
        Response response = new Response();
        List<OperationManual> manualList = manualDao.selectAllMsg(productId);
        if (manualList.isEmpty()){
            response = Response.error(5001,"无该数据");
            return response;
        }
        response = Response.success(manualList);
        return response;
    }
}
